Skip to content

RDKB-64502: [RDKB][TELEMETRY2_0] Multi‑profile config using method = subscribe, logs null & empty values - #406

Open
AravindanNC wants to merge 3 commits into
developfrom
topic/RDKB-64502
Open

RDKB-64502: [RDKB][TELEMETRY2_0] Multi‑profile config using method = subscribe, logs null & empty values#406
AravindanNC wants to merge 3 commits into
developfrom
topic/RDKB-64502

Conversation

@AravindanNC

Copy link
Copy Markdown
Contributor

Reason for change: Check for NULL and empty values before adding to report
Test Procedure: Build RDKE image

Signed-off-by: nc.aravindan@gmail.com

Copilot AI review requested due to automatic review settings August 5, 2026 14:30
@AravindanNC
AravindanNC requested a review from a team as a code owner August 5, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Telemetry 2.0 report generation to avoid emitting event marker entries when the marker value is empty/placeholder and the marker is configured not to report empty values (notably for multi-profile method=subscribe scenarios).

Changes:

  • Skip encoding an event marker into JSON when reportEmptyParam is false and the marker value qualifies as empty via checkForEmptyString().
  • Free and null out the skipped marker’s u.markerValue to avoid carrying empty values forward.

Comment thread source/reportgen/reportgen.c
Comment thread source/reportgen/reportgen.c
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 5, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

source/reportgen/reportgen.c:1572

  • This change introduces new behavior (skipping empty/"NULL" event marker values when reportEmptyParam is false), but existing encodeEventMarkersInJSON tests don’t assert that empty/"NULL"/whitespace-only values are skipped or that leading-whitespace non-empty values are preserved. Adding a focused unit test would help prevent regressions for subscribe-based multi-profile configs.
                if(!eventMarker->reportEmptyParam && checkForEmptyString(eventMarker->u.markerValue))
                {
                    T2Debug("Skipping empty/\"NULL\" marker value for : %s\n", eventMarker->markerName);

source/reportgen/reportgen.c:1576

  • The empty/"NULL" check runs on the raw markerValue before trimming/normalization. Because checkForEmptyString() treats any leading space as empty, a non-empty value like " 1.23" (or values with leading whitespace) will now be skipped even though it should be reported (especially when trimParam is enabled). Consider ignoring leading whitespace for the emptiness check so only truly empty/whitespace-only/"NULL" values are skipped.
            if(eventMarker->u.markerValue != NULL)
            {
                if(!eventMarker->reportEmptyParam && checkForEmptyString(eventMarker->u.markerValue))
                {
                    T2Debug("Skipping empty/\"NULL\" marker value for : %s\n", eventMarker->markerName);
                    free(eventMarker->u.markerValue);
                    eventMarker->u.markerValue = NULL;
                    break;

Copilot AI review requested due to automatic review settings August 5, 2026 15:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

source/reportgen/reportgen.c:1572

  • This change introduces new behavior (skipping empty/"NULL" event marker values when reportEmptyParam is false) but there is no unit test asserting that cJSON object creation/add-to-array is skipped for markerValue "" or "NULL".
                if(!eventMarker->reportEmptyParam && checkForEmptyString(eventMarker->u.markerValue))
                {
                    T2Debug("Skipping empty/\"NULL\" marker value for : %s\n", eventMarker->markerName);

source/reportgen/reportgen.c:1574

  • The empty/"NULL" check runs before trimLeadingAndTrailingws(), but checkForEmptyString() treats any string starting with a space as empty. With trimParam enabled, values like " 1.23" will be skipped instead of being trimmed and reported.
                if(!eventMarker->reportEmptyParam && checkForEmptyString(eventMarker->u.markerValue))
                {
                    T2Debug("Skipping empty/\"NULL\" marker value for : %s\n", eventMarker->markerName);
                    free(eventMarker->u.markerValue);
                    eventMarker->u.markerValue = NULL;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants